package com.hex.ds.hdrs.app.dao;

import com.hex.bigdata.hbda.base.BaseDao;
import com.hex.ds.hdrs.app.po.AppExecStrategyPo;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Package com.hex.ds.hdrs.app.dao
 * @ClassName AppExecStrategyDao
 * @Description 应用与策略关联表Dao接口
 * @Author yu liuyang
 * @Date 2023/4/16 10:32
 * @Version v1.0
 **/
@Repository
public class AppExecStrategyDao extends BaseDao {

    /**
     * @Method queryListByAppCode <br>
     * @Param [appCode] <br>
     * @Return java.util.List<com.hex.ds.hdrs.app.po.AppExecStrategy> <br>
     * @Description 根据应用编码查询应用与策略关联列表 <br>
     * @Author yu liuyang <br>
     * @Date 2023/4/16 10:36 <br>
     * @Version V1.0 <br>
     */
    public List<AppExecStrategyPo> queryListByAppCode(String appCode) {
        return this.selectList(AppExecStrategyPo.class,"com.hex.ds.hdrs.app.dao.AppExecStrategyDao.queryListByAppCode",appCode);
    }

    /**
     * @Method add <br>
     * @Param [appExecStrategy] <br>
     * @Return int <br>
     * @Description 添加应用与策略关联 <br>
     * @Author yu liuyang <br>
     * @Date 2023/4/16 10:37 <br>
     * @Version V1.0 <br>
     */
    public int insert(AppExecStrategyPo appExecStrategyPo) {
        return this.insert("com.hex.ds.hdrs.app.dao.AppExecStrategyDao.insert", appExecStrategyPo);
    }

    /**
     * @Method deleteByAppCode <br>
     * @Param [appCode] <br>
     * @Return int <br>
     * @Description 根据应用编码删除应用与策略关联 <br>
     * @Author yu liuyang <br>
     * @Date 2023/4/16 10:39 <br>
     * @Version V1.0 <br>
     */
    public int deleteByAppCode(String appCode) {
        return this.delete("com.hex.ds.hdrs.app.dao.AppExecStrategyDao.deleteByAppCode", appCode);
    }

}